<template>
  <div class="home">
      <top-view />
      <sales-view />
      <bottom-view />
      <map-view />
  </div>
</template>
<script>
import TopView from '../components/TopView'
import SalesView from '../components/SalesView'
import BottomView from '../components/BottomView'
import MapView from '../components/MapView'
// 测试请求接口
import { test } from '../api'
export default {
  name: 'Home',
  components: {
    TopView,
    SalesView,
    BottomView,
    MapView
  },
  mounted() {
    // 测试请求接口
    /* 
    catch(err) 补获异常
    test().then(data => {
      console.log('数据')
    })
    */
    test().catch(err => {
      console.log('异常',err);
    }) 
  },
}
</script>
<style>
.home {
  width: 100%;
  height: 100%;
  padding: 20px;
  background: #eee;
  box-sizing: border-box; /* 宽高包括内边距 */
}
</style>